import javax.servlet.http.HttpServletRequest;


public class User {
	
	public Integer id;
	public String login;
	
	public String color;
	public String password;
	public String name;
	
	

	public String getPassword() {
		return password;
	}



	public void setPassword(String password) {
		this.password = password;
	}



	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}



	public User(HttpServletRequest request) {
		
		//this.setColor(request.getParameter("red"));
		this.setColor("red");
		this.setLogin(request.getParameter("login"));
		this.setName(request.getParameter("name"));
		this.setPassword(request.getParameter("password"));
		
	}



	@Override
	public String toString() {
		return "User [id=" + id + ", login=" + login + ", color=" + color
				+ ", password=" + password + ", name=" + name + "]";
	}



	public User(String login, String password, String name, String color) {
		
		
		this.setColor(color);
		this.setName(name);
		this.setLogin(login);
		this.setPassword(password);
		// TODO Auto-generated constructor stub
	}



	public Integer getId() {
		return id;
	}



	public void setId(Integer id) {
		this.id = id;
	}



	public String getLogin() {
		return login;
	}



	public void setLogin(String login) {
		this.login = login;
	}






	public String getColor() {
		return color;
	}



	public void setColor(String color) {
		this.color = color;
	}

}
